home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / tjgold.zip / INSTALL.003 / DEMRD9.PAS < prev    next >
Pascal/Delphi Source File  |  1995-05-29  |  2KB  |  60 lines

  1. {--------------------------------------------------------------------------}
  2. {                Product: TechnoJock's Turbo Toolkit GOLD                  }
  3. {                                                                          }
  4. {                     TTT GOLD - DEMO PROGRAM                        }
  5. {                                                                          }
  6. {                Copyright 1986-1995  TechnoJock Software, Inc.            }
  7. {                           All Rights Reserved                            }
  8. {                          Restricted by License                           }
  9. {--------------------------------------------------------------------------}
  10.  
  11. {Description: DEMRD9.PAS
  12.               Illustrates prompting for a string variable
  13.               with the added ability of password entry.
  14. }
  15.  
  16. Program DemRd9; { password }
  17.  
  18. {$I GOLDFLAG.INC}
  19.  
  20. uses DOS,CRT, GoldAttr, GoldStr, GoldMisc,
  21.      GoldFast, GoldRead, GoldIO, GoldWin, GoldKey;
  22.  
  23. var TmpMsg, TmpStr: string;
  24.  
  25. procedure SetScreen;
  26. {}
  27. begin
  28.    Clear(WhiteOnCyan,'▒');
  29.    ClearLine(1,WhiteOnBlue);
  30.    WriteCenter(1,UseTint,' Demo of PromptStr from GOLDREAD ');
  31.    WriteAt(1,2,BlueOnRed,replicate(80,'▀'));
  32.    WriteAT(70,2,WhiteOnBlack,'TTT Gold!');
  33.    ClearLine(25,YellowOnBlue);
  34. end; { SetScreen }
  35.  
  36. begin
  37. {$IFOPT D+}
  38.    HeapRecord;
  39. {$ENDIF}
  40.    SetScreen;
  41.    MouseShow(true);
  42.    if ReadVars.PromptStyle = 4 then
  43.       UseCustomChars;
  44.    ReadVars.Password := true;
  45.    TmpStr := PromptStr(0,5,29,'^Enter User Password:',
  46.                        ' GoldRead Input Demo ','',true);
  47.    if ReadVars.LastAction = Escaped then
  48.       TmpMsg := 'You choose to leave!'
  49.    else if Strip('A',' ',TmpStr) = '' then
  50.       TmpMsg := 'You didn''t make an entry'
  51.    else
  52.       TmpMsg := 'You entered '+TmpStr;
  53.    PromptOK(' PromptStr ',TmpMsg);
  54.    MouseShow(false);
  55.    clrscr;
  56. {$IFOPT D+}
  57.    HeapCheck;
  58. {$ENDIF}
  59. end.
  60.